package TwoPoint;

/**
 * @description: 描述
 * @author: Mr.Hu
 * @create: 2022/3/26 17:22
 **/
public class MoveZeroes {
    public void moveZeroes(int[] nums){
        int slow = 0,fast = 0;
        for (; fast < nums.length;fast++) {
            if(nums[fast]!=0){
                nums[slow++] = nums[fast];
            }
        }
        for (;slow< nums.length;slow++){
         nums[slow] = 0;
        }
    }
}
